﻿using UnityEngine;

namespace Gp.Scripts.Core {
    public abstract class SettleNodeRoot : MonoBehaviour {
        private bool _isInitialized = false;
        public void Init()
        {
            if (_isInitialized) return;
            _isInitialized = true;
            OnInit();
        }
        protected virtual void OnInit() {}

        public static GameObject CreateClassNode(string objName, Transform parent) 
        {
            GameObject ret = new GameObject($"{objName} (class)");
            ret.transform.SetParent(parent);
            return ret;
        }
    }
}